package com.lmk.ct.support;

import java.io.Serializable;

/**
 * 配置文件参数
 * @author LaoMake
 * @email laomake@hotmail.com
 */
public class AppProperties implements Serializable {

    /** 类的根路径 */
    private String classPathRoot;

    /** 数据库服务器主机 */
    private String host;

    /** 数据库服务器端口 */
    private String port;

    /** 数据库用服务器户名 */
    private String user;

    /** 数据库服务器密码 */
    private String password;

    /** 数据库名 */
    private String dataBase;

    /** 数据库链接地址 */
    private String url;

    /** 基础包名 */
    private String packageName;

    /** 作者 */
    private String author;

    /** 邮箱 */
    private String email;

    /** 版本号 */
    private String version;

    /** 是否将表名前缀解析为模块 */
    private Boolean parseModule;

    /** 生成多对一 */
    private Boolean manyToOne;

    /** 生成多对多 */
    private Boolean manyToMany;

    /** 生成一对多 */
    private Boolean oneToMany;

    public AppProperties() {
        classPathRoot = FileUtils.getRootClassPath(AppProperties.class);
    }

    public String getClassPathRoot() {
        return classPathRoot;
    }

    public void setClassPathRoot(String classPathRoot) {
        this.classPathRoot = classPathRoot;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public String getPort() {
        return port;
    }

    public void setPort(String port) {
        this.port = port;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getDataBase() {
        return dataBase;
    }

    public void setDataBase(String dataBase) {
        this.dataBase = dataBase;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getPackageName() {
        return packageName;
    }

    public void setPackageName(String packageName) {
        this.packageName = packageName;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public Boolean getParseModule() {
        return parseModule;
    }

    public void setParseModule(Boolean parseModule) {
        this.parseModule = parseModule;
    }

    public Boolean getManyToOne() {
        return manyToOne;
    }

    public void setManyToOne(Boolean manyToOne) {
        this.manyToOne = manyToOne;
    }

    public Boolean getManyToMany() {
        return manyToMany;
    }

    public void setManyToMany(Boolean manyToMany) {
        this.manyToMany = manyToMany;
    }

    public Boolean getOneToMany() {
        return oneToMany;
    }

    public void setOneToMany(Boolean oneToMany) {
        this.oneToMany = oneToMany;
    }

    @Override
    public String toString() {
        return "{" +
                "host='" + host + '\'' +
                ", port='" + port + '\'' +
                ", user='" + user + '\'' +
                ", password='" + password + '\'' +
                ", dataBase='" + dataBase + '\'' +
                ", url='" + url + '\'' +
                ", packageName='" + packageName + '\'' +
                ", author='" + author + '\'' +
                ", email='" + email + '\'' +
                ", version='" + version + '\'' +
                ", parseModule=" + parseModule +
                ", manyToOne=" + manyToOne +
                ", manyToMany=" + manyToMany +
                ", oneToMany=" + oneToMany +
                '}';
    }
}
